'use strict';
app.service('mobilePhoneWhiteService',['$q','utilService',function($q,utilService){

//新增白名单
    this.addMobilePhoneWhite = function($scope){
        var deferred = $q.defer();
        utilService.api({
            url:$scope.app.domain + 'system/user/white/list/phone',
            data:{phone:$scope.phone},
            method:'POST'
        }).then(function(result){
            deferred.resolve(result);
        });
        return deferred.promise;
    };
    //删除白名单
    this.delMobilePhoneWhite = function($scope){
        var deferred = $q.defer();
        utilService.api({
            url:$scope.app.domain + 'system/user/white/list/phone',
            data:$scope.phone,
            method:'DELETE'
        }).then(function(result){
            deferred.resolve(result);
        });
        return deferred.promise;
    }
}]);